<template>
     <div class="pay_bottom" v-if="isShowbottom">
        <div class="all_radio_buttons">
          <input type="checkbox" class="custom-control-input" :id="'cbFull'" :checked="isFull" @change="fullChange"/>
            <label class="custom-control-label" :for="'cbFull'">全选</label>
        </div>
        <div class="total_amount">合计￥{{ amount }}</div>
        <div class="merger_payment_button">
          <van-button
            @click="onClickMergerPay"
            size="small"
            style="margin-right: 3px"
            type="info"
            square
            >合并支付</van-button
          >
        </div>
      </div>
</template>
<script>
export default {
    data() {
        return {
            checked:true
        }
    },
    props:{
      isFull:{
        type:Boolean,
        default:true
      },
      amount:{
        type:Number,
        default:0
      },
      isShowbottom: {
        type:Boolean,
        default:true
      }
    },
    methods:{
        onClickMergerPay() {
            this.$emit('mergepayment')
        },
        fullChange(e) {
          this.$emit('full-change',e.target.checked)
        }
    }
}
</script>
<style>
.pay_bottom {
  position: relative;
  margin-top: 15px;
  padding: 0 23px;
  height: 35px;
}

.merger_payment_button {
  position: absolute;
  right: 26px;
}

.total_amount {
  position: absolute;
  left: 60px;
  color: #323233;
  font-size: 14px;
}

</style>